<?php

Route::any('login','LoginController@login');//登录路由
Route::get('code','LoginController@code');//登录页验证码路由验证码

Route::group(['middleware'=>['web','admin.login']],function(){//后台路由组，设置admin.login中间件
    Route::get('index','IndexController@index');//后台首页路由
    Route::get('/','IndexController@index');//后台首页路由
    Route::get('info','IndexController@info');//后台系统基本信息页路由
    Route::get('quit','LoginController@quit');//退出登录路由
    Route::any('pass','IndexController@pass');//修改密码路由

    Route::resource('parking','ParkingController');//停车资源路由
    Route::get('handle','ParkingController@handle');//信息查询路由
    Route::post('balance/{id}','ParkingController@balance');//驶出结算路由
    Route::post('search','ParkingController@search');//异步查找路由
    Route::post('handlesearch','ParkingController@handlesearch');//信息异步查找路由
    Route::post('findrent','ParkingController@findrent');//异步判断是否是月租车路由

    Route::resource('admin','AdminController');//管理员操作的资源路由resource
    Route::post('able','AdminController@able');//管理员禁用启用操作路由

    Route::get('charge','ChargeController@index');//收费标准显示路由
    Route::any('charge/modify','ChargeController@modify');//收费修改方法路由
    Route::get('charge/bill','ChargeController@bill');//收费统计路由

    Route::resource('rent','RentController');//月租管理资源路由
    Route::post('rentsearch','RentController@rentsearch');//月租车异步查找路由
    Route::get('renewal/{id}','RentController@renewal');//续租页显示路由
    Route::post('handlerenewal','RentController@handlerenewal');//续租操作路由

    Route::get('getparkingspace','ParkingspaceController@getparkingspace');//获取停车位
    Route::resource('parkingspace','ParkingspaceController');//停车位资源路由
});
